<?php
require_once('../db/check_login.php');
require_once('../db/config.php');
$db=new db($config);
$id=$_GET['id'];
$userData=$db->foundOnebyWhere('user',"user='$_SESSION[user]'");//取得用户数据
$roleData=$db->foundOnebyWhere('user_role',"u_id='$userData[id]'");//取得角色数据
$row=$db->checkAction($roleData['r_id'],5,8);
if($row==0){
echo '<script type="text/javascript">alert("你无权限操作!");location=("list.php");</script>';
return false;
}
$delRow=$db->delete('artclass',"id=$id");
if($delRow){
echo '<script type="text/javascript">alert("删除成功");location=("list.php");</script>';	
}
?>